v1.33
27 nov 2005

$ - SCREEN
@ - ATTRs

  .
get$ ,3,4*8

\0 -   
\1 - X  ( )
\2 - Y  ( )
__________________________________
   .
get@ ,X,Y

\0 -   
\1 - X  ( )
\2 - Y  ( )
__________________________________
MOVE from,to,leight
__________________________________
FILL from,leight-1,byte to fill
__________________________________
BORDER 0-7
        LD A,0-7 ;OUT (254),a
__________________________________
GCLS 0-255
-   
__________________________________
ACLS 0-255
-   
__________________________________
RND 8
-   0-255
   - . 
 cntrnd (macro CNTRND)
__________________________________
CNTRND  (call cntrnd)
-   0-255
 - max 
   - . 
__________________________________
DELAY  (call delay)
- 
BC -  
__________________________________
AT_ATTR DE,HL (call at_attr)
- YXattr DE > ATTR HL
         DE,DE / HL,HL
__________________________________
ATTR_ADDR DE,0/1 (call attr_addr)
   RET
- attr  DE > addr  DE
0/1  16384/49152
__________________________________
SCR_ATTR DE  (call scr_attr)
!!!    RET
- $ DE > attr DE
__________________________________
PIX_ADDR DE,HL  (call pix_addr)
- YXpix DE > $ HL
__________________________________
DOWN HL  (call DOWN_HL)
-   HL (DE,BC)  1pix 
__________________________________
PR_ATTR (-)  (call pr_attr)
- fill   40 byte

        LD HL,tabl
        CALL pr_attrs
        ...
tabl    DB x,y,w>,h^,

 "-" 
        CALL pr_attrs
        DB x,w>,y,h^,

 at_attr DE,HL
__________________________________
PR_SGEN  (call pr_sgen)
-   Sprite Gen5.1.
HL -  
DE -   
-    ***.s.
 scr_attr (macro SCR_ATTR DE).
        DOWN_DE  (DOWN DE)
-    8.
__________________________________
SCROLL_PR (call scrlPR)  -/-
-  
scrlPRN+1 - scr addr
scrlFNT+1 - font

scrlTXT+1 - text
dec HL
ld (SC+1),HL

scrlT-1 - 0/201 - scroll on/off

CIKL1+1 - scroll <> 
 DOWN_HL (macro DOWN HL)
scrlBUF - DS 8
-  $ 2048byt. - 
- text DB "txt",0(eot)
- 1 - stop scroll  scroll :
ld (scrl+3),0
- 2,0-255 - pause 0-255 sec(!) 
__________________________________
PRINT_PR (call printPR)  +/- speed up!
-  . 1   
A  -  
DE - YX pix
PR42X+1 -   (    )
 DOWN_HL (macro DOWN H)
 pix_addr (macro PIX_ADDR DE,HL)
-  $ 2048byt.
- : 1 - . 0 -  .
   -  
__________________________________
PRTXT1 FONT (call prtxt1)
-   
call prtxt
DB x,y,"text",13,"text",0
PRtxtS+1 - 13  
PRtxtT+1 -  0   
 printPR (macro PRINT_PR)
__________________________________
PRTXT FONT (call prtxt)
-   
IY,txt  
txt DB y,x,"text",13,"text",0
PRtxtS+1 - 13  
PRtxtT+1 - 0   
 printPR (macro PRINT_PR)
__________________________________
SPRITE spr,16384
-   Sprite Generator 5.1
 pr_sgen
 scr_attr
__________________________________

SET_IM2 #6000,INTer
-  IM2
#6000 -   257b ( 256)
INTer -   
__________________________________
mouseDRV
-    

mouseP ds 2 -  
mouseB ds 1 -  0-rmb, 1-lmb
mouseY ds 2 - YX   SCR
 :
mouseY ds 4
(mouseB=mouseY+2)
(mouseP=mouseY+3)
__________________________________
RATE (call rate)
-    

HL -  .
curs2R DB 0,0,1,255
1   -  -
0-wait, 1-print, 255-end/rep 
 
Z - 0; NZ - 1-254; C - end/rep
A -   
__________________________________
CHFRAME (call chframe)
-     
HL -   
DE -  
IX -    
 
HL -  
Z - end of table
__________________________________
PRCURS (call prCURS)
-  
HL,(fonADDR) - $ addr+offset
IX,(curADDR) - spr addr
fonADDR ds 3 - addr+offset
curADDR ds 2
mouseY  ds 2
mouseH  equ 12
__________________________________
PRCURSqSP (call prCURS)
-    SP
8x16 pix
  PRCURS,  8
 dowdown),  
HL,(fonADDR) - $ addr+offset
IX,(curADDR) - spr addr
fonADDR ds 3 - addr+offset
curADDR ds 2
mouseY  ds 2
mouseH  equ 12
__________________________________
INMEM (call inmem)
-    

pix_addr (macro PIX_ADDR DE,HL)
DOWN_HL (macro DOWN HL)
fonADDR ds 3
mouseY  ds 2
mouseH  equ 12
fonBUF  ds mouseH*2

__________________________________
OUTMEM (call outmem)
-    

DOWN_DE (macro DOWN DE)
fonADDR ds 3
fonBUF  ds mouseH*2
mouseH  equ 12
__________________________________
BLOOM (call bloom)
-   

rate (macro RATE)
blrate db 0,1,255
__________________________________
VMENU (call Vmenu)
-  

call Mcnt
call cp_coord
VmN - -  1byte
      (    Mcnt)
  
  
menu ds 1 - N of menu
        255 - not a menu
__________________________________
call Mcnt  (sub of VMENU)
-      

DB 2 - - /
DB 5 - -   1 
     x -> y |
DB 1,0,32,0,8 ( pix)
1  - 0- 


Mcnt -   
A -   (0-254)
 
HL -   ( cp_coord)
__________________________________
CP_COORD (call cp_coord)
-   YX  

ld HL, coords
            x -> y |
coords DB 1,0,32,0,8
1  - 0- 

mouseY DS
 2
C- ; NC-
__________________________________
ATTR_CNT   (call ATTRcnt)
-  ATTR .  


Mcount+1 -   
 -   (0-254)

Mcount (macro MCOUNT)
pix_addr (macro PIX_ADDR DE,HL)
scr_attr (macro SCR_ATTR DE)

 : 
 - <>  
DE - attr addr
HL - scr  addr

__________________________________
CHCURS  (call chCURS)
-    

rate (macro RATE)
sprR    ds 2   
sprSIZE ds 2  
sprADDR  2  1 
curADDR ds 2   
__________________________________
INTER (call INTer)
-  IM2
 
INTerA-3 call 0
INTerA= of user proc  
__________________________________
INTERp (call INTer)
-  IM2  
 :
PAGE ds 1 -   restore page
INTerp+1 - .  INTera
  0 (16)
INTerA call 0
INTerA+1= jp > user proc  
__________________________________
DIEI_SPACE

MAIN_ DI -  
DIEI_SPACE -  
__________________________________
MUZOFF (call muzOFF)
 AY
__________________________________
CPSTRING (call cpSTR)
- CP     
cpSTR+1  - TAB addr
cpSTR2+1 - BUF addr
cpSTR2+4 - String leight
 
 - 255    .
 -    

  0 -  
255 -   
DB "text",0,"",255
__________________________________
CPRAW  (call cpRAW)
hl -  
DE -  
BC -  
 
str DB "",13

 :
NZ -  
HL -    +1
DE -     

Z -    
__________________________________


PLOT   (call plot)
-   
plotR
#A6 - AND (HL)
#B6 - OR  (HL)
#AE - XOR (HL)


pix_addr (macro PIX_ADDR DE,HL)
DE - YX pix
plotBUF DS 1 - save   
  
HL - $   
__________________________________
RAZKAT   (call razkat)
- () N 

HL - addr of spr
DE - addr of razkat spr
BC - size of spr
(RAZM4-1), 
(RAZMcp+1),- +1 
__________________________________
WIN  (call winM)
-   
HL - winTAB addr

winTABaddr
        dw -2
        dw scr addr
        db -   
        db 1 (  ),   , ,   
__________________________________

RND_NUM   (call rnd_num)
  64  16,  
 , ..  64   4   16  

rNUM+1 -AND  RND (3,7,15,31,63..)
rNUM2+1-    used  (tab64)
ld B,16 -    
ld IX,tab16 -  
__________________________________

STR_DEC0  (call str_dec) +/-
   .   .
ld BC,STR_buf -   5+1 
ld HL,12345   -  0-65535
__________________________________

STR_DEC   (call str_dec) +/-
   .   
ld BC,STR_buf -   5+1 
ld HL,12345   -  0-65535
__________________________________

SWITCH  (call switch)
  .  
cp 1
JP z,adr1
cp 2
JP z,adr2
HL -  

 :
ret   -  
jp    .
DB 1
DW addr1
DB 2
DW addr2
DB 255 ; 
__________________________________


ink 3 0 2 7 1 1 1 1 
pap 5 6 6 4 3 2 4 7 
brg 0 0 1 0 1 1 1 1 


9668 stack1
7409 depacked1F

001 - 1
003 - 11
007 - 111
015 - 1111
031 - 1111 1
063 - 1111 11
127 - 1111 111
255 - 1111 1111

prMSK+1 - mask
a,b -  
hl - scr$
de - sprite


CHFRAME (call chframe)
-     
HL -  1 
DE -  
BC -   frameNUMBER
IX -   frameRATE 
 
HL -  
Z - end of table

520290
555230
